1 <?php
2 ob_start();
3 session_start();
4 include(
"header.php");
5 include(
"sidebar.php");
6 include(
"dbconnection.php");
7 ?>
8
9
10         <div id=
"main">
11         <p>
12           <?php
13
14 $result = mysql_query(
"SELECT * FROM customer where custid='$_SESSION[custid]' ");
15 $rowrec = mysql_fetch_array($result);
16
17
18 $result1 = mysql_query(
"SELECT * FROM service where custid='$_SESSION[custid]' AND status='Completed' ");
19
20 $result2 = mysql_query(
"SELECT * FROM service where custid='$_SESSION[custid]' AND status='Pending' ");
21
22 $result3 = mysql_query(
"SELECT * FROM vehicle where custid='$_SESSION[custid]' AND status='Accepted' ");
23
24 $result4 = mysql_query(
"SELECT * FROM vehicle where custid='$_SESSION[custid]' AND status='Pending' ");
25
26 $result5 = mysql_query(
"SELECT * FROM booking where custid='$_SESSION[custid]' ");
27
28         ?>
29         </p>
30         <table width=
"476" height="213" border="0">
31           <tr bgcolor=
"#FFFFCC">
32             <th height=
"33" scope="row"><u>Customer ID:</u></th>
33             <td>&nbsp; <?php echo $rowrec[custid]; ?></td>
34           </tr>
35           <tr bgcolor=
"#CCCCCC">
36             <th height=
"35" scope="row" ><u>Customer Name :</u></th>
37             <td>&nbsp; <?php echo $rowrec[fname].
" ".$rowrec[lname]; ?></td>
38           </tr>
39           <tr bgcolor=
"#FFFFCC">
40             <th height=
"59" scope="row"><u>Vehicle service status:</u></th>
41             <td>&nbsp; <?php echo mysql_num_rows($result2) ;?> vehicles status Pending.<br />
42         &nbsp; <?php echo mysql_num_rows($result1) ;?> vehicles status Completed. </td>
43           </tr>
44           <tr bgcolor=
"#CCCCCC">
45             <th scope=
"row" ><u>Vehicle sell request:</u></th>
46             <td>&nbsp; Sold :<?php echo mysql_num_rows($result3) ;?> Vehicles <br />&nbsp; Pending :<?php echo mysql_num_rows($result4) ;?> Vehicles</td>
47           </tr>
48           <tr bgcolor=
"#FFFFCC">
49             <th scope=
"row"><u>No. of vehicles purchased:</u></th>
50             <td>&nbsp;<?php echo mysql_num_rows($result5) ;?></td>
51           </tr>
52         </table>
53 </div>
54
55 <!-- wrap ends here -->
56 </div>
57
58 <?php
59 include(
"footer.php");
60 ?>


Gõ tìm kiếm nhanh...